#!/usr/bin/env python3
import sys
#用法 markdown filename | markd_wrap.py filename.htm
if __name__=='__main__':
	filename = sys.argv[1]
	fp = open(filename,'w')
	fp.write('<html>\n<head><meta charset="utf-8"></head>\n<body>\n')
	for data in sys.stdin:
		fp.write(data)
	fp.write('\n</body>\n</html>\n')
	fp.close()
